<template>
	<div>
		<detail-banner :list="imgs" :ImgUrl="ImgUrl" :sigName="sigName"></detail-banner>
		<detail-header></detail-header>
		<detail-list ></detail-list>
		<detail-content :list="piao"></detail-content>
	</div>
</template>

<script>
	import DetailBanner from './components/banner'
	import DetailHeader from './components/Header'
	import DetailList from './components/List'
    import DetailContent from './components/Content'
	import axios from 'axios'
	export default {
		name: 'Detail',
		data () {
			return {
				piao: [],
				imgs: [],
				sigName: '',
				ImgUrl:''
			}
		},
		components: {
		  DetailBanner,
		  DetailHeader,
		  DetailList,
		  DetailContent
		},
		methods: {
		  getDetailInfo () {
		  	axios.get('/api/detail.json',{
		  		params: {
		  			id: this.$route.params.id
		  		}
		  	}).then(this.handleGetDataSucc)
		  },
		  handleGetDataSucc (res) {
		  	res = res.data
		  	if (res.ret && res.data) {
					const data = res.data
					this.piao = data.piao
					this.imgs = data.imgs
					this.sigName = data.sigName
					this.ImgUrl = data.ImgUrl
                    console.log(this.ImgUrl)
				}
		  }
		},
		mounted () {
			this.getDetailInfo ()
		}
	}
</script>

<style>
</style>